Fixed #2: Warn when file size is bigger than maximal allowed

Based on patch by @Abs62.